//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "UnitLogIn.h"
#include "UnitProf.h"
#include "UnitStud.h"
#include "UnitRegister.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormLogIn *FormLogIn;
//---------------------------------------------------------------------------
__fastcall TFormLogIn::TFormLogIn(TComponent* Owner)
   : TForm(Owner)
{
}
//---------------------------------------------------------------------------




void __fastcall TFormLogIn::ComboBox1Change(TObject *Sender)
{
   if(ComboBox1->ItemIndex!=0)
   {
      Edit1->Visible=true;
      Edit2->Visible=true;
      Button1->Visible=true;
   }
   else
   {
      Edit1->Visible=false;
      Edit2->Visible=false;
      Button1->Visible=false;
   }
}
//---------------------------------------------------------------------------

void __fastcall TFormLogIn::Button1Click(TObject *Sender)
{
   if(ComboBox1->ItemIndex==1)
   {
      FormStud->Show();
      FormLogIn->Hide();
   }
   else if(ComboBox1->ItemIndex==2)
   {
      FormProf->Show();
      FormLogIn->Hide();
   }
}
//---------------------------------------------------------------------------
void __fastcall TFormLogIn::Button2Click(TObject *Sender)
{
   FormRegister->Show();
   FormLogIn->Hide();
}
//---------------------------------------------------------------------------
